<?php
/**
 * @Author: Marte
 * @Date:   2017-08-20 08:43:15
 * @Last Modified by:   Marte
 * @Last Modified time: 2017-08-20 08:55:53
 */
require '../config_connect.php';//引入数据库
$_username=$_POST['username'];
$_password=$_POST['password'];
require '../../common/register.func.php';//引入函数库
if(!isset($_POST["submit"])){
      exit('非法访问!');
  }
_check_username($_username);
_check_password($_password);
$_sql='select username,password from author';
$_result=$_mysql->query($_sql);
while($_assoc=$_result->fetch_assoc())
{
    if($_assoc['username']==$_username&&$_assoc['password']==$_password)
    {
        echo "<script>location='../../author_index.php';</script>";
    }else
    {

        echo "<script>alert('请重新登录');location='../../author_dl.php';</script>";
    }
}
?>

